package framework.eea.event;

import framework.eea.StateBasedGame;
import framework.eea.entity.Entity;
import framework.eea.gui.JFrameGameContainer;

/**
 *
 * @author Markus Schr&ouml;der
 */
/**
 * A <em>Component</em> is an abstract element that has a ID and an owner. Components can be updated using the {@link #update(GameContainer, StateBasedGame, int)} method.
 *
 * @author Alexander Jandousek, Timo B&auml;hr
 * @version 1.0
 */
public abstract class Component {

    protected String id;
    protected Entity owner;

    public Component(String componentID) {
        id = componentID;
    }

    public String getId() {
        return id;
    }

    public Entity getOwnerEntity() {
        return owner;
    }

    public void setOwnerEntity(Entity owningEntity) {
        owner = owningEntity;
    }

    public abstract void update(JFrameGameContainer gc, StateBasedGame sb, int delta);
}
